 var ExtractTextPlugin = require("extract-text-webpack-plugin");
 
var config = {
    entry: "./src/main.jsx",
    output: {
        path: './src/js/',
        filename: 'index.js'
    },
   
    module: {
        loaders: [{
            test: /\.jsx?$/,
            exclude: /node_modules/,
            loader: 'babel',
            query: {
                presets: ['es2015', 'react']
            }
        },{
            test: /\.js?$/,
            exclude: /node_modules/,
            loader: 'babel',
            query: {
                presets: ['es2015', 'react']
            }
        }, { 
            test: /\.css$/, 
            loader: ExtractTextPlugin.extract("style-loader", "css-loader")
        }, {
            test : /\.less$/,
            loader: ExtractTextPlugin.extract("style-loader", "css-loader!less-loader")
        }]
    },
    resolve: {
        extensions: ['','.js', '.jsx']
    }/*,
    plugins: [
        new webpack.ProvidePlugin({
            $: "jQuery"
        })
    ]*/
};

module.exports = config;

